<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="<?=domain?>static/style/manage.css" rel="stylesheet" type="text/css" />
<link href="<?=domain?>static/style/fancybox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?=domain?>static/scripts/core.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/fancybox.js" charset="utf-8"></script>
<script type="text/javascript" src="<?=domain?>static/scripts/manage.js" charset="utf-8"></script>
<title><?=name?></title>
<body class="hoariness">
<div class="head">
	<div class="area">
		<div class="logo">12306抢票系统</div>
		<div class="parent">
			<div class="nav">
				<ul>
					<?php
						foreach($menu as $key=>$value){
							echo '<li><a href="'.domain.'index.php?c='.$value['child'][0]['controller'].'&a='.$value['child'][0]['method'].'" class="'.(stristr($value['controller'],$this->request['controller'])?'sel':'').'">'.$value['name'].'</a></li>';
						}
					?>
	    		</ul>
			</div>
			<div class="user">欢迎您&nbsp;<?=$name?>&nbsp;,<a href="<?=domain?>index.php?c=manage&a=out">【退出】</a></div>
		</div>
	</div>
	<div class="child">
		<div class="nav">
			<?php
				$controller=0;$method=0;
				foreach($menu as $k=>$v){
					if(stristr($v['controller'],$this->request['controller'])){
						$controller=$k;
						echo '<ul class="sel '.$v['controller'].'">';
					}else{
						echo '<ul class="'.$v['controller'].'">';
					}
					foreach($v['child'] as $key=>$value){
						if($value['method']==$this->request['method']&&$value['controller']==$this->request['controller']){
							$method=$key;
						}
						echo '<li class="'.$value['method'].'"><a href="'.domain.'index.php?c='.$value['controller'].'&a='.$value['method'].'">'.$value['name'].'</a></li>';
					}
					echo '</ul>';
				}
			?>
		</div>
		<div class="place">当前位置:<?=$menu[$controller]['name']?>&nbsp;>&nbsp;<?=$menu[$controller]['child'][$method]['name']?></div>
	</div>
</div>
<div class="work">
	<div class="form">
		<h3 class="reallynow">
           <span><?=$menu[$controller]['child'][$method]['name']?></span>
           <a fancybox="width:460,height:220" href="<?=domain.'index.php?c=role&a=append'?>" class="hd add">添加角色</a>
        </h3>
		 <table class="fix">
			<thead>
				<tr>
					<th><input type="checkbox" name="all" value=""/></th>
					<th>ID</th>
					<th>名称</th>
					<th>描述</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<?php
				foreach($role as $key=>$value){
				?>
				<tr>
					<td><input type="checkbox" name="name" value=""/></td>
					<td><?=$value['id']?></td>
					<td><?=$value['name']?></td>
					<td><?=$value['describe']?></td>
					<td><?=$value['locked']==0?'正常':($value['locked']==1?'未激活':($value['locked']==2?'禁止':'已删除'))?></td>
					<td>
					<a fancybox="width:500,height:420" href="<?=(domain.'index.php?c=role&a=purview&role='.$value['id'])?>">权限</a>&nbsp;
					<a fancybox="width:500,height:200" href="<?=(domain.'index.php?c=role&a=edit&role='.$value['id'])?>">编辑</a>&nbsp;
					<a href="<?=(domain.'index.php?c=role&a=locked&role='.$value['id'])?>" action="RequestA" mixed="sub:{locked:<?=($value['locked']==2||$value['locked']==1?0:2)?>}"><?=($value['locked']==2||$value['locked']==1?'激活':'禁止')?></a>&nbsp;
					</td>
				</tr>
				<?php
				}
				?>
			</tbody>
		</table>
	</div>
	<div class="pagination"><?=$pagination?>&nbsp;&nbsp;<font>共<?=$total?>条记录</font></div>
</div>
<div class="footer">
	<div class="credits">Power by <a href="http://ticket.cnadlm.com" target="_blank">cnadlm</a></div>
	<div class="connect">
		<script src="http://s96.cnzz.com/stat.php?id=4920030&web_id=4920030" language="JavaScript">
	</div>
</div>
</body>
</html>